# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-changelog-chug
_pkgname=changelog_chug
pkgver=0.0.3
pkgrel=2
pkgdesc='Parser library for project Change Log documents.'
arch=('any')
url='https://pypi.org/project/changelog-chug/#files'
license=('MIT')
depends=('python' 'python-semver')
makedepends=('python-build' 'python-pip' 'python-wheel' 'python-semver')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8764cccf68d730cdd48c7f9a2b2729f50d6128763ffd5b28026f515def9bea83c0a7ac91d7b21452e6c7e4c4215674c97ed92cf0a0f73b0324a3713049a754a8')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

